package org.goodsl.deploymap

/**
 * Created with IntelliJ IDEA.
 * User: Simon Xiao
 * Date: 12-12-19
 * Time: 上午11:45
 * Copyright goodsl.org 2012~2020
 */
class AppSystem {
    HashMap<String,Module> modules = new HashMap<String,Module>()
    HashMap<String,Service> services = new HashMap<String,Service>()
    HashMap<String,Env> envs = new HashMap<String,Env>()



    public Service getService(String name){
            return services.get(name)
    }

    public Env getEnv(String name){
        return  envs.get(name)
    }

    public Module getModule(String name){
        return modules.get(name)
    }

    public Collection<Env> getEnvSet(){
        return envs.values();
    }
    public Collection<Service> getServiceSet(){
        return services.values();
    }

    public boolean hasService(String name){
        return services.containsKey(name);
    }
    public boolean hasEnv(String name){
        return envs.containsKey(name);
    }
    public boolean hasModule(String name){
        return modules.containsKey(name);
    }
}
